package com.foreknow.demo10;

/**
 * 动态可变参数
 * Object...values  Object[]
 */
public class TestMethod {
    public void add(int a,int b) {
        System.out.println(a+b);
    }

    public void add(int a,int b,Object...values) {

    }

    public static void main(String[] args) {
        TestMethod testMethod = new TestMethod();
        testMethod.add(1,2);

        testMethod.add(3,4,5,6,7,8,9);
    }
}
